from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os

def generate_launch_description():
    # 获取包的路径
    package_dir = get_package_share_directory('seat_mqtt_bridge')
    # 加载参数文件
    param_file = os.path.join(package_dir, 'config', 'params.yaml')
    
    return LaunchDescription([
        Node(
            package='seat_mqtt_bridge',
            executable='seat_mqtt_bridge',
            name='seat_mqtt_bridge',
            parameters=[param_file],  # 加载参数文件
            output='screen'
           # emulate_tty=True
        )
    ])
    